
var gotoID='pathID';
var gotoStr='pathID2';
var bindID='pathID2';
var selectID = $("#"+gotoID).val()
$("#"+bindID).click(function (){
    layer.open({
        type: 2
        ,title: '选择分类'
        ,content: '/includes/selects?id='+selectID
        ,btn: ['确定', '取消']
        ,area: ['30%', '40%']
        ,yes: function(index, layero){
            var othis = layero.find('iframe').contents().find("#layuiadmin-app-form-tags")
                ,selected = othis.find('input[name="selected"]').val()
                ,selectedID = othis.find('input[name="selectedID"]').val()
            $("#"+gotoID).val(selectedID)
            $("#"+gotoStr).val(selected)
            layer.close(index);
        }
    });
})